//
//  DXWEssenceViewController.m
//  BuDeJie
//
//  Created by 淡馨慰 on 16/7/24.
//  Copyright © 2016年 淡馨慰. All rights reserved.
//

#import "DXWEssenceViewController.h"


@interface DXWEssenceViewController ()

@end

@implementation DXWEssenceViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    //1.设置导航条按钮
    [self setupNavigationBar];
    
}
- (void)setupNavigationBar
{
    //1.1设置左侧按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem barButtonItemWithImage:[UIImage imageNamed:@"nav_item_game_icon"] highlightImage:[UIImage imageNamed:@"nav_item_game_click_icon"] target:self action:@selector(gameBtnClick)];
    
    //1.2设置右侧按钮
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem barButtonItemWithImage:[UIImage imageNamed:@"navigationButtonRandom"] highlightImage:[UIImage imageNamed:@"navigationButtonRandomClick"] target:self action:@selector(randomBtnClick)];
    
    //1.3设置中间标题图
    self.navigationItem.titleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"MainTitle"]];

}


//监听左侧按钮点击
- (void)gameBtnClick
{
    NSLog(@"点击了游戏按钮");
}
//监听右侧按钮点击
- (void)randomBtnClick
{
    NSLog(@"点击了随机按钮");
}

@end
